// 代码块1
const obj1 = {
    a : 1
}

const obj2 = {
    a : 1
}

const obj3 = {
    a : 1
}


// 代码块2
const obj4 = {
    a : 1
}

const obj5 = {
    b: 1
}

const obj6 = {
    c: 1
}


// 代码块1和代码块2哪一个执行效率高，请验证

console.time('代码块1')
for (let i = 0; i < 1000; i++) {
   const obj = {}
   obj['a'] = i
}
console.timeEnd('代码块1')
console.time('代码块2')
for (let i = 0; i < 1000; i++) {
    const obj = {}
    obj[`${i}`] = i
}
console.timeEnd('代码块2')